

public abstract class Structure extends Controllable{

	protected static int[] range = {0,1,15,1,1,1};
	final int FARM = 1, MINE = 2, PLANT = 3, BASE = 4, TOWER = 5;

	
	public Structure(int _x, int _y){
		super(_x, _y);
		metal = 100;
		nutrient = 100;
		energy = 100;
		metalRT = metalORT = 10;
		nutrientRT = nutrientORT =  5;
		energyRT = energyORT = 20;
		maxHealth = health = 1000;
		this.originalDefence = this.defence = 20;
		
	}


	//==============GETTERS=============

	public int getX(){return this.x;}
	public int getY(){return this.y;}		//since X and Y are final, I have to redefine the method.
	static int range(int type) {return range[type];}
	public String toString(){return this.getTypeName()+": #"+this.getID()+" = "+health+" - Energy: "+energy+" Metal: "+metal+" Food: "+nutrient;}
	
	// ========SETTINGS=======
	
	
	
	static void incRange(int type) {range[type]++;}
	
	// =========DO STUFF=============	
	public boolean die() {return map.die(x, y, this);}
}
